package com.newear.marathon.dto.admin.enumeration;

/**
 * 后台用户状态：系统表状态暂时统一两种【可用、不可用】
 *
 * @Author MicroBin
 * @create 2021/3/27 13:28
 */
public enum AdminStatus
{
    _0(0,"无效"),
    _1(1,"有效"),
    ;

    private Integer code;

    private String text;

    AdminStatus(Integer code, String text) {
        this.code = code;
        this.text = text;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static AdminStatus getEnums(String code) {
        for (AdminStatus enums : values()) {
            if (code.equals(enums.getCode())) {
                return enums;
            }
        }
        return null;
    }

}
